package com.ruoyi.system.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 商品规格对象 product_specification
 *
 * @author ruoyi
 * @date 2025-05-24
 */
public class ProductSpecification extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 规格唯一标识符(主键) */
    private Long id;

    /** 规格销售价格(支持精确到小数点后4位) */
    @Excel(name = "规格销售价格(支持精确到小数点后4位)")
    private BigDecimal sellingPrice;

    /** 规格成本价格(用于计算毛利率) */
    @Excel(name = "规格成本价格(用于计算毛利率)")
    private BigDecimal costPrice;

    /** 原材料成本占比(百分比，如85.50表示85.5%) */
    @Excel(name = "原材料成本占比(百分比，如85.50表示85.5%)")
    private BigDecimal rawMaterialRatio;

    /** 规格对应的SKU条码(唯一标识商品规格) */
    @Excel(name = "规格对应的SKU条码(唯一标识商品规格)")
    private String skuBarcode;

    /** 库存上限(0表示无限制) */
    @Excel(name = "库存上限(0表示无限制)")
    private Long maxInventory;

    /** 库存预警阈值(低于此值触发预警) */
    @Excel(name = "库存预警阈值(低于此值触发预警)")
    private Long inventoryWarning;

    /** 是否同步售价至门店(0:否,1:是) */
    @Excel(name = "是否同步售价至门店(0:否,1:是)")
    private Integer syncPriceToStores;

    /** 规格当前状态 */
    @Excel(name = "规格当前状态")
    private String status;

    /** 规格描述(如"红色L码") */
    @Excel(name = "规格描述")
    private String description;

    /** 规格显示排序 */
    @Excel(name = "规格显示排序")
    private Long sortOrder;

    /** 是否为默认规格(商品详情页默认展示) */
    @Excel(name = "是否为默认规格(商品详情页默认展示)")
    private Integer isDefault;

    /** 规格创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "规格创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date addTime;

    /** 手机号 */
    @Excel(name = "手机号")
    private String phone;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }

    public void setSellingPrice(BigDecimal sellingPrice)
    {
        this.sellingPrice = sellingPrice;
    }

    public BigDecimal getSellingPrice()
    {
        return sellingPrice;
    }

    public void setCostPrice(BigDecimal costPrice)
    {
        this.costPrice = costPrice;
    }

    public BigDecimal getCostPrice()
    {
        return costPrice;
    }

    public void setRawMaterialRatio(BigDecimal rawMaterialRatio)
    {
        this.rawMaterialRatio = rawMaterialRatio;
    }

    public BigDecimal getRawMaterialRatio()
    {
        return rawMaterialRatio;
    }

    public void setSkuBarcode(String skuBarcode)
    {
        this.skuBarcode = skuBarcode;
    }

    public String getSkuBarcode()
    {
        return skuBarcode;
    }

    public void setMaxInventory(Long maxInventory)
    {
        this.maxInventory = maxInventory;
    }

    public Long getMaxInventory()
    {
        return maxInventory;
    }

    public void setInventoryWarning(Long inventoryWarning)
    {
        this.inventoryWarning = inventoryWarning;
    }

    public Long getInventoryWarning()
    {
        return inventoryWarning;
    }

    public void setSyncPriceToStores(Integer syncPriceToStores)
    {
        this.syncPriceToStores = syncPriceToStores;
    }

    public Integer getSyncPriceToStores()
    {
        return syncPriceToStores;
    }

    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getStatus()
    {
        return status;
    }

    public void setDescription(String description)
    {
        this.description = description;
    }

    public String getDescription()
    {
        return description;
    }

    public void setSortOrder(Long sortOrder)
    {
        this.sortOrder = sortOrder;
    }

    public Long getSortOrder()
    {
        return sortOrder;
    }

    public void setIsDefault(Integer isDefault)
    {
        this.isDefault = isDefault;
    }

    public Integer getIsDefault()
    {
        return isDefault;
    }

    public void setAddTime(Date addTime)
    {
        this.addTime = addTime;
    }

    public Date getAddTime()
    {
        return addTime;
    }

    public void setPhone(String phone)
    {
        this.phone = phone;
    }

    public String getPhone()
    {
        return phone;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("sellingPrice", getSellingPrice())
                .append("costPrice", getCostPrice())
                .append("rawMaterialRatio", getRawMaterialRatio())
                .append("skuBarcode", getSkuBarcode())
                .append("maxInventory", getMaxInventory())
                .append("inventoryWarning", getInventoryWarning())
                .append("syncPriceToStores", getSyncPriceToStores())
                .append("status", getStatus())
                .append("description", getDescription())
                .append("sortOrder", getSortOrder())
                .append("isDefault", getIsDefault())
                .append("addTime", getAddTime())
                .append("updateTime", getUpdateTime())
                .append("phone", getPhone())
                .toString();
    }
}
